package com.xyoto.community.mapper.main;

import com.xyoto.community.entity.main.HotTopic;
import com.xyoto.community.po.TopicHotNumPO;

import java.util.List;

/**
 * 热门话题Mapper
 */
public interface HotTopicMapper {


    /**
     * 新增热门话题
     * @param hotTopic
     * @return
     */
    Integer saveHotTopic(HotTopic hotTopic);

    /**
     * 获取所有热门话题和当前热度
     * @return
     */
    List<TopicHotNumPO> getAllHotTopic();

    /**
     * 更新热门话题热度值
     * @param hotTopics
     * @return
     */
    Integer updateHotTopic(List<HotTopic> hotTopics);

    /**
     * 根据话题热度倒序查询热门话题
     * @return
     */
    List<HotTopic> selectListOrderByCurrentHotDesc(String title, Integer endIndexId);

}
